package proiect.fis.persistence;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import proiect.fis.commons.beans.Oras;
import proiect.fis.commons.beans.TipPachet;

/**
 *
 * @author Boogie
 */
public class DefaultDataLoader {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("Proiect_FIS_V2.0PU");
        OrasDao oDao = new OrasDao(emf);
        
        Oras o = new Oras();
        o.setNume("Oras1");
        o.setTipRuta(TipPachet.NORMAL);
        
        
        Oras o2 = new Oras();
        
        o2.setConexiune(o);
        
        
        o2.setNume("Oras2");
        o2.setTipRuta(TipPachet.NORMAL);
        
        o.setConexiune(o2);
        
        
        oDao.save(o);
        
               
        
    }
}
